package org.example.service.impl;

import jakarta.annotation.Resource;
import org.example.mapper.ElderlyMapper;
import org.example.service.ElderlyService;
import org.example.utils.ElderlyUpdateRequest;
import org.example.utils.R;
import org.springframework.stereotype.Service;

/**
 * ClassName: ElderlyServiceImpl
 * Description:
 *
 * @Author Kotaro
 * @Create 2024/12/9 9:30
 * @Version 1.0
 */
@Service
public class ElderlyServiceImpl implements ElderlyService {
    @Resource
    ElderlyMapper elderlyMapper;
    @Override
    public R updateElderlyByElderlyId(ElderlyUpdateRequest elderlyUpdateRequest) {
        int rows = elderlyMapper.updateElderlyByElderlyId(elderlyUpdateRequest);
        if(rows> 0){
            return R.successful("修改成功" , elderlyUpdateRequest);
        }else {
            return R.error("修改失败" , null);
        }
    }
}
